<div id="app" v-cloak>
    <div class="padding20">
        <el-form :model="form" label-width="auto" style="max-width: 600px">
            <el-form-item label="用户昵称">
                <el-input v-model="form.nickname" placeholder="请输入昵称"/>
            </el-form-item>
            <el-form-item label="密码">
                <el-input v-model="form.password" placeholder="输入代表修改密码" type="pasword" show-password/>
            </el-form-item>
            <el-form-item label="头像" >
                <mu-avatar-upload v-model="form.avatar" style="width: 100px;width: 100px"></mu-avatar-upload>
            </el-form-item>
            <el-form-item label="分组" v-if="form.id!=1">
                <mu-tree-select v-model="form.group_id" :options="allGroup" value-field="id" label-field="name"></mu-tree-select>
            </el-form-item>
            <el-form-item label="用户邮箱">
                <el-input v-model="form.email" placeholder="请输入用户邮箱"/>
            </el-form-item>
            <el-form-item label="状态" v-if="form.id!=1">
                <el-switch v-model="form.status"
                           :active-value="1"
                           :inactive-value="0"
                />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="common.onEditSubmit(form)">提交</el-button>
                <el-button @click="common.cancel()">取消</el-button>
            </el-form-item>
        </el-form>
    </div>
</div>